#ifndef CONTAINER_HPP
#define CONTAINER_HPP

#include <vector>
#include <stdexcept>

class Mesh {
public:
    Mesh(int nx, int ny, double dx = 1.0, double dy = 1.0);
    void setBoundaryConditions(double top, double bottom, double left, double right);
    void setBoundaryCondition(int i, int j, double value);
    void solvePoisson(int max_iterations = 1000, double tolerance = 1e-6);
    double getValue(int i, int j) const;
    void applyStencil();
    const std::vector<double>& getSolution() const;

private:
    int nx_, ny_;
    double dx_, dy_;
    std::vector<double> solution_;
    double* rhs_;
};

#endif // CONTAINER_HPP
